import request from '@/utils/request'

//获取首页顶部数据
export function realDataInfo(query) {
  return request({
    url: '/v1/real/report',
    method: 'get',
    params: query
  })
}

//获取代理名称列表
export function getProxyNameList(query) {
  return request({
    url: '/v1/proxy/name',
    method: 'get',
    params: query
  })
}
//获取站长名称列表
export function getChannelNameList(query) {
  return request({
    url: '/v1/channel/name',
    method: 'get',
    params: query
  })
}

//获取代理列表
export function getProxyList(query) {
  return request({
    url: '/v1/agency/list',
    method: 'get',
    params: query
  })
}

//获取数据报表
export function getDataReport(query) {
  return request({
    url: '/v1/data/report',
    method: 'get',
    params: query
  })
}

//获取下级数据报表
export function subordinate(query) {
  return request({
    url: '/v1/subordinate/report',
    method: 'get',
    params: query
  })
}

//新增代理或站长
export function addProxyOrChannel(data) {
  return request({
    url: '/v1/user',
    method: 'post',
    data
  })
}


//获取站长列表
export function getChannelList(query) {
  return request({
    url: '/v1/channel/list',
    method: 'get',
    params: query
  })
}

//获取站长列表
export function getChannelList1(query) {
  return request({
    url: '/v1/channel/list1',
    method: 'get',
    params: query
  })
}


//获取代理结算列表
export function getSettleList(query) {
  return request({
    url: '/v1/settle/accounts',
    method: 'get',
    params: query
  })
}


//修改结算状态
export function changeSettleStatus(data) {
  return request({
    url: '/v1/confirm/settle/accounts',
    method: 'put',
    data
  })
}


//获取链接设置列表
export function getPlatformConfig(query) {
  return request({
    url: '/v1/config',
    method: 'get',
    params: query
  })
}

//新增链接设置
export function addPlatformConfig(data) {
  return request({
    url: '/v1/config',
    method: 'put',
    data
  })
}



//获取图表数据
export function getChartData(query) {
  return request({
    url: '/v1/chart/data',
    method: 'get',
    params: query
  })
}


//获取广告图表数据
export function getAdvChartData(query) {
  return request({
    url: '/v1/redirect',
    method: 'get',
    params: query
  })
}

//修改站长/代理信息
export function editUserInfo(params, data) {
  return request({
    url: '/v1/user',
    method: 'put',
    params,
    data,
  })
}
//获取站长的js域名
export function getJsDomain() {
  return request({
    url: '/v1/code',
    method: 'get'
  })
}
// 获取收益
export function getEarnings(query) {
  return request({
    url: '/v1/earnings',
    method: 'get',
    params: query
  })
}


//登录

export function quickLogin(query) {
  return request({
    url: '/v1/quick/login',
    method: 'get',
    params: query
  })
}

export function getChannelConfig(query) {
  return request({
    url: '/v1/channel/config',
    method: 'get',
    params: query
  })
}

export function setChannelConfig(data) {
  return request({
    url: '/v1/channel/config',
    method: 'post',
    data: data
  })
}
export function getBlickList(query) {
  return request({
    url: '/v1/shielding/list',
    method: 'get',
    params: query
  })
}
export function delBlickList(query) {
  return request({
    url: '/v1/shielding/list',
    method: 'delete',
    params: query
  })
}

export function getCutList(query) {
  return request({
    url: '/v1/cut/plate',
    method: 'get',
    params: query
  })
}
export function delCutList(query) {
  return request({
    url: '/v1/cut/plate',
    method: 'delete',
    params: query
  })
}
// 获取腾讯回传统计
export function getTXstatistics(query) {
  return request({
    url: '/v1/back/statistics',
    method: 'get',
    params: query
  })
}

// 获取落地页列表
export function getLangingPage(query) {
  return request({
    url: '/v1/landing/page',
    method: 'get',
    params: query
  })
}

// 添加落地页
export function addLangingPage(data) {
  return request({
    url: '/v1/landing/page',
    method: 'post',
    data: data
  })
}

// 修改落地页
export function UpdateLangingPage(data) {
  return request({
    url: '/v1/landing/page',
    method: 'put',
    data: data
  })
}

// 删除落地页
export function DelLangingPage(query) {
  return request({
    url: '/v1/landing/page',
    method: 'delete',
    params: query
  })
}